local js = require "js"
local Vue = js.global.Vue
local VueRouter = js.global.VueRouter

local router = VueRouter:createRouter(loader.obj({
    history = VueRouter:createWebHashHistory();
    routes = loader.Array({
        loader.obj({
            path = '/';
            component = loader.import('./view/components/demo.vue'),
        })
    })
}))

local vueApp = Vue:createApp(loader.obj({}))
vueApp:use(router)
vueApp:mount('#app')

js.global.vueApp = vueApp
